package com.jingsheng.jingshengcity.di.module;

import com.jess.arms.di.scope.ActivityScope;
import com.jingsheng.jingshengcity.mvp.contract.MyOrderPageFragmentContract;
import com.jingsheng.jingshengcity.mvp.model.MyOrderPageFragmentModel;

import dagger.Module;
import dagger.Provides;


/**
 * Created by Administrator on 2017/5/10.
 */

@Module
public class MyOrderPageFragmentModule {
    private MyOrderPageFragmentContract.View view;

    /**
     * 构建MyOrderPageModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public MyOrderPageFragmentModule(MyOrderPageFragmentContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    MyOrderPageFragmentContract.View provideMyOrderPageView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    MyOrderPageFragmentContract.Model provideMyOrderPageModel(MyOrderPageFragmentModel model) {
        return model;
    }
}